import { BasicColumn } from "/@/components/Table"
import { FormSchema } from "/@/components/Table"
import { rules } from "/@/utils/helper/validator"
import { render } from "/@/utils/common/renderUtils"
import { UploadBizType } from "/@/enums/uploadEnum"
import { DescItem } from "/@/components/Description/index"

export const sharedOnCell = (data, index) => {
  if (index % 2 == 0) {
    return { colSpan: 0 }
  }
}

export const columns: BasicColumn[] = [
  {
    title: "订单信息",
    align: "left",
    width: 400,
    minWidth: 400,
    dataIndex: "orderInfo",
    slots: { customRender: "orderInfo" },
    customCell: (_, index) => ({
      colSpan: index % 2 == 0 ? 24 : 1,
    }),
  },
  {
    title: "实付款",
    width: 100,
    align: "center",
    customCell: sharedOnCell,
    dataIndex: "payAmount",
    slots: { customRender: "payAmount" },
  },
  {
    title: "门店名称",
    width: 200,
    align: "center",
    customCell: sharedOnCell,
    dataIndex: "storeName",
    slots: { customRender: "storeName" },
  },
  {
    title: "买家信息",
    width: 200,
    align: "center",
    customCell: sharedOnCell,
    dataIndex: "buyer",
    slots: { customRender: "buyer" },
  },
  {
    title: "订单状态",
    width: 100,
    align: "center",
    customCell: sharedOnCell,
    dataIndex: "orderStatusText",
    slots: { customRender: "orderStatus" },
  },
  {
    title: "支付方式",
    width: 120,
    align: "center",
    customCell: sharedOnCell,
    dataIndex: "payWay",
    slots: { customRender: "payWay" },
  },
  {
    title: "配送方式",
    width: 120,
    align: "left",
    customCell: sharedOnCell,
    dataIndex: "deliveryWay",
    slots: { customRender: "deliveryWay" },
  },
  {
    title: "评价",
    width: 1-0,
    align: "center",
    customCell: sharedOnCell,
    dataIndex: "evaluate",
    slots: { customRender: "evaluate" },
  },
  
  // {
  //   title: "操作",
  //   dataIndex: "action",
  //   align: "center",
  //   width: 160,
  //   minWidth: 160,
  //   fixed: 'right',
  //   customCell: sharedOnCell,
  //   slots: { customRender: "action" },
  // }

]